﻿/*
    Copyright Multi-Soft co.2009 
*/

using System;
using System.Diagnostics;
using System.Reflection;



namespace Rmlife.Web
{
    /// <summary>
    /// 站点版本
    /// </summary>
    public class Versions
    {
        /// <summary>
        /// 站点版本号, 至少为 "x.x" 格式
        /// </summary>
        public const string ASSEMBLY_VERSION = "1.0";
        /// <summary>
        /// 站点版本build号,至少为 ".0" 或 "" 来表示，不能超过0xFFFF
        /// </summary>
        public const string ASSEMBLY_VERSIONBUILD = "";

        /// <summary>
        /// 站点 标题
        /// </summary>
        public const string ASSEMBLY_PRODUCTTITLE = "旺旺吧插卡计费查询平台";
        /// <summary>
        /// 站点 产品名称
        /// </summary>
        public const string ASSEMBLY_PRODUCTNAME = "Rmlife.CardRecord";
        /// <summary>
        /// 站点 产品网址
        /// </summary>
        public const string ASSEMBLY_PRODUCTSITE = "http://www.Rmlife.com.cn";

        #region "版本方法"
        static Version version = AssemblyName.GetAssemblyName(Assembly.GetExecutingAssembly().Location).Version;
        /// <summary>
        /// 获取版本号
        /// </summary>
        public static string GetVersion
        {
            get
            {
                return string.Format("{0}.{1}", version.Major, version.Minor);
            }
        }
        /// <summary>
        /// 获取完整版本号
        /// </summary>
        public static string GetFullVersion
        {
            get
            {
                return string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);
            }
        }
        /// <summary>
        /// 获得产品名称
        /// </summary>
        /// <returns></returns>
        public static string GetProductName
        {
            get
            {
                return ASSEMBLY_PRODUCTNAME + " " + GetVersion;
            }
        }

        /// <summary>
        /// 获得产品版本类型
        /// </summary>
        /// <returns></returns>
        public static string GetProductType
        {
            get
            {
                return string.Empty;
            }
        }
        #endregion

    }
}
